let selectors = id("com.ss.android.ugc.aweme:id/b3n").visible(true);
if (selectors) {
    logd(getNodeCenterX(selectors));
    logd(getNodeCenterY(selectors));
    logd(getNodeWidth(selectors));
    logd(getNodeHeight(selectors));
}

/**
 @description 取组件中心点X坐标
 @version     20201129
 @author      飞云<283054503@qq.com>
 @param       selectors {object} :组件选择器
 @return      {int}:返回整数型坐标，失败返回null
 */
function getNodeCenterX(selectors) {
    let node = selectors.getOneNodeInfo(1000);
    if (node) {
        let bounds = node.bounds;
        let centerX = (bounds.left + bounds.right) / 2;
        return Math.round(centerX);
    }
}

/**
 @description 取组件中心点Y坐标
 @version     20201129
 @author      飞云<283054503@qq.com>
 @param       selectors {object} :组件选择器
 @return      {int}:返回整数型坐标，失败返回null
 */
function getNodeCenterY(selectors) {
    let node = selectors.getOneNodeInfo(1000);
    if (node) {
        let bounds = node.bounds;
        let centerY = (bounds.top + bounds.bottom) / 2;
        return Math.round(centerY);
    }
}

/**
 @description 取组件宽度
 @version     20201129
 @author      飞云<283054503@qq.com>
 @param       selectors {object} :组件选择器
 @return      {int}:返回整数型，失败返回null
 */
function getNodeWidth(selectors) {
    let node = selectors.getOneNodeInfo(1000);
    if (node) {
        let bounds = node.bounds;
        let width = bounds.right - bounds.left;
        return Math.round(width);
    }
}

/**
 @description 取组件高度
 @version     20201129
 @author      飞云<283054503@qq.com>
 @param       selectors {object} :组件选择器
 @return      {int}:返回整数型，失败返回null
 */
function getNodeHeight(selectors) {
    let node = selectors.getOneNodeInfo(1000);
    if (node) {
        let bounds = node.bounds;
        let height = bounds.bottom - bounds.top;
        return Math.round(height);
    }
}